package com.tianxin.workbao.workBao.Activity;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;


import com.tianxin.workbao.workBao.R;
import com.tianxin.workbao.workBao.bean.Inputbill;

/**
 * Created by hacker on 2017/7/25.
 */

public class InputDetailActivity extends BaseActivity {
    private Toolbar mToolbar;
    private Inputbill mInput;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.staff_detail);
        super.initStatusBar(true);
        Bundle bundle = getIntent().getExtras();
        mInput = (Inputbill) bundle.getSerializable("input");

        initView();
        initData();
        initEvent();
        bindView();
    }

    public void initView() {
        mToolbar = findViewById(R.id.toolbar);
        mToolbar.setTitle("");
        mToolbar.setNavigationIcon(AppCompatResources.getDrawable(this, R.drawable.ic_action_back_24dp));
        setSupportActionBar(mToolbar);

    }

    @Override
    public void initData() {
    }

    @Override
    public void initEvent() {
        mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                InputDetailActivity.this.finish();
            }
        });
    }

    @Override
    public void bindView() {

    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_staff_detail, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.staff_save) {


        }

        return super.onOptionsItemSelected(item);
    }



    private boolean ifEmpty(String input) {
        if (input == null || input.length() == 0 || "".equals(input)) {
            return true;
        } else {
            return "".equals(input.trim());
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}
